<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../lib/bootstrap3/css/bootstrap.min.css">
<script src="../lib/angularjs/angular.min.js"></script>
<script src="../lib/angularjs/angular-animate.min.js"></script>
<script src="../lib/angularjs/angular-route.min.js"></script>
</head>
<body ng-app="routingDemoApp">
<h2>路由应用</h2>
<ul>
    <li><a href="#/">首页</a></li>
    <li><a href="#/computers">电脑</a></li>
    <li><a href="#/printers">打印机</a></li>
</ul>
<div ng-view></div>
</body>
<script>
    var app=angular.module('routingDemoApp',['ngRoute']);
    app.config(['$routeProvider',function ($routeProvider) {
        $routeProvider
            .when('/',{template:'这是首页'})
            .when('/computers',{template:'这是computers页'})
            .when('/printers',{template:'这是printers页'})
        ;
    }]);
</script>
</html>